package com.yongninger.adapter;

import java.util.HashMap;
import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.yongninger.activity.R;

public class SlerkListViewAdapter extends ListViewAdapter {
	public SlerkListViewAdapter(Context context,
			List<HashMap<String, Object>> items) {
		super(context, items);
	}

	@Override
	public View getView(int position, View view, ViewGroup parent) {
		if (view == null) {
			view = inflater.inflate(R.layout.clerk_item, null);
		}
		TextView cid = (TextView) view.findViewById(R.id.cid);
		cid.setText(items.get(position).get("cid").toString());
		TextView cname = (TextView) view.findViewById(R.id.cname);
		cname.setText(items.get(position).get("cname").toString());
		TextView ccode = (TextView) view.findViewById(R.id.ccode);
		ccode.setText(items.get(position).get("ccode").toString());
		TextView ccompany = (TextView) view.findViewById(R.id.ccompany);
		ccompany.setText(items.get(position).get("ccompany").toString());
		return view;
	}
}
